<%@page import="cn.cdahua.basic.model.SystemContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="style.jsp"></jsp:include>
<style>
body {
	background-color: #FFF;
}
</style>
</head>
<body>
	<div class="table-responsive">
		<table class="table table-hover table-condensed table-bordered">
			<thead>
				<tr>
					<th class="title" width="20%">题目</th>
					<th>作者</th>
					<th>投稿时间</th>
					<th>审核时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<c:forEach items="${datas.datas }" var="t">
			<tr>
				<th class="title"><div>${t.title }</div></th>
				<th>${t.user.nickname }</th>
				<th>${t.createDate }</th>
				<th>
				<c:if test="${t.readDate != null }">${t.readDate }</c:if>
				<c:if test="${t.readDate == null }">尚未审核</c:if>				
				</th>
				<th>
				<c:if test="${t.status == 'ACCEPT' }">已通过</c:if>				
				<c:if test="${t.status == 'UNACCEPT' }">未通过</c:if>				
				<c:if test="${t.status == 'UNREAD' }">未审核</c:if>								
				</th>
				<th>
				<c:if test="${isStudent }">
					<a href="<%=request.getContextPath() %>/article/update/${t.id}">
						<button class="btn btn-default">修改</button>
					</a>
				</c:if>
				<c:if test="${!isStudent }">
					<a href="<%=request.getContextPath() %>/article/read/${t.id}">
						<button class="btn btn-default">查看</button>
					</a>
				</c:if>
					&nbsp;
					<a href="<%=request.getContextPath() %>/article/delete/${t.id}">
						<button class="btn btn-danger">删除</button>
					</a>
					</th>
			</tr>
			</c:forEach>
		</table>
	</div>
	<jsp:include page="pager.jsp"></jsp:include>
</body>